/*
 *@本JS功能：班级管理
 *@本js作者：杨锡君
 *@编写时间：2017年10月31日
 */
$(function() {
    var Alert1 = new Alert();
    var confirm1 = new Confirm();
    var loading1 = new Loading();
    loading1.init();
    function report(opt) {
        var omg = opt.memDetail;
        var str = '<div data-stuorteaid="'+ omg.stuorteaId +'"  class="downloadBtn">学习情况资料<div class="downInfoBox"><div class="topPecent"></div><div class="middleBox"><ul><li class="reportDownBox"><i>学习报告</i><b></b><img class="downReportLoad"  data-stuorteaid="'+ omg.stuorteaId +'"  src="pc/images/ico_reportDownClick.png" ></li><li><i>理论作业</i><b class="homeWork"><i  data-stuorteaid="'+ omg.stuorteaId +'"  class="reportZip">打包</i></b><img class="workDown" src="pc/images/ico_reportDownNone.png" ></li><li><i>实验报告</i><b class="labReport"><i  data-stuorteaid="'+ omg.stuorteaId +'"  class="reportZip">打包</i></b><img class="reportDown" src="pc/images/ico_reportDownNone.png" ></li><li><i>考试试卷</i><b class="text"><i  data-stuorteaid="'+ omg.stuorteaId +'"  class="reportZip">打包</i></b><img class="textDown" src="pc/images/ico_reportDownNone.png" ></li></ul></div></div></div>' +
            '<div class="title">学生信息</div>' +
            '<div class="infoBox">' +
            '<b id="showDetail">查看详情</b>'+
            '<div>' +
            '<div class="idBox">' +
            '<div class="fl"></div>' +
            '<ul class="fl">' +
            '<li>'+ omg.userName +'</li>' +
            '<li>'+ omg.telephoneNum +'</li>' +
            '</ul>' +
            '</div>' +
            '<div class="info">' +
            '<ul>' +
            '<li>'+ omg.className +'</li>' +
            '<li>'+ omg.professionName +'</li>' +
            '<li>'+ omg.departmentName +'</li>' +
            '</ul>' +
            '</div>' +
            '<div class="line"></div>' +
            '</div>' +
            '<div id="energy"></div>' +
            '' +
            '</div>' +
            '<div class="detailBox">' +
            '<div>' +
            '<table class="tableInfo" cellpadding="0" cellspacing="0" border="0">' +
            '<tr>' +
            '<th>能力类别</th>'+
            '<th>课程</th>'+
            '<th>权重</th>'+
            '<th>课程类型</th>'+
            '<th>能力值</th>'+
            '</tr>';
        if(opt.finalRelCoPoListAll!=undefined&&opt.finalRelCoPoListAll!=null&& opt.finalRelCoPoListAll!=''){
            for(var i = 0;i < opt.finalRelCoPoListAll.length;i++){
                for(var j = 0;j < opt.finalRelCoPoListAll[i].relcopoList.length;j++){
                    if(j == 0){
                        str+= '<tr>' +
                            '<td  rowspan="'+ opt.finalRelCoPoListAll[i].relcopoList.length +'" class="blueTitle">'+ opt.finalRelCoPoListAll[i].powerName +'</td>' +
                            '<td>'+ opt.finalRelCoPoListAll[i].relcopoList[j].courseName +'</td>' +
                            '<td>'+ opt.finalRelCoPoListAll[i].relcopoList[j].width*100 +'%</td>' +
                            '<td>'+ (opt.finalRelCoPoListAll[i].relcopoList[j].openClassState==1?"已开课":"未开课") +'</td>' +
                            '<td rowspan="'+ opt.finalRelCoPoListAll[i].relcopoList.length +'" class="blueScore">'+ opt.finalRelCoPoListAll[i].powerSource +'</td>' +
                            '</tr>';
                    }else{
                        str+=  '<tr>' +
                                '<td>'+ opt.finalRelCoPoListAll[i].relcopoList[j].courseName +'</td>' +
                                '<td>'+ opt.finalRelCoPoListAll[i].relcopoList[j].width*100 +'%</td>' +
                                '<td>'+ (opt.finalRelCoPoListAll[i].relcopoList[j].openClassState==1?"已开课":"未开课") +'</td>' +
                            '</tr>';
                    }
                }

            }
        }
            str+='</table>' +
            '</div>' +
            '</div>'+
            '<div class="workBox">' +
            '<div class="fr workInfo">'+ opt.comment +'</div>' +
            '<h3 class="fr ">推荐岗位</h3>' +
            '</div>' +
            '<div class="colorBox">' +
            '<div class="fl"><i>■</i>理论课学习</div>' +
            '<div class="fl"><i>■</i>实验课学习</div>' +
            '<div class="fl"><i>■</i>学习活跃程度</div>' +
            '</div>' +
            '<div class="infoMain">' +
            '<ul>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.readCourseCount +'</h3>' +
            '<p>阅读课件次数</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+  opt.statisticsMap.taskcount +'</h3>' +
            '<p>提交作业次数</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ parseInt(opt.statisticsMap.homeworRate*100) +'%</h3>' +
            '<p>作业提交率</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.onlineExamCount +'</h3>' +
            '<p>在线考试次数</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ parseInt(opt.statisticsMap.passRate*100) +'%</h3>' +
            '<p>考试及格率</p>' +
            '</li>' +
            '</ul>' +
            '<ul>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.exprenotecount +'</h3>' +
            '<p>实验笔记数量</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ Number(( opt.statisticsMap.sumtime/3600).toFixed(2))+'h</h3>' +
            '<p>实验时长</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.comExpreCount +'</h3>' +
            '<p>实验次数</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.exprecount +'</h3>' +
            '<p>提交实验报告数量</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ parseInt(opt.statisticsMap.exprementRate*100) +'%</h3>' +
            '<p>实验报告提交率</p>' +
            '</li>' +
            '</ul>' +
            '<ul>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.loginCount +'</h3>' +
            '<p>登录次数</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.comCourseCount +'</h3>' +
            '<p>进入课程次数</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.coutSelectCount +'</h3>' +
            '<p>选课次数</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.problemcount +'</h3>' +
            '<p>提问问题数量</p>' +
            '<div class="lines"></div>' +
            '</li>' +
            '<li>' +
            '<h3>'+ opt.statisticsMap.answercount +'</h3>' +
            '<p>回答问题数量</p>' +
            '</li>' +
            '</ul>' +
            '</div>' +
            '';
        var str1 = "";
        for(var i = 0;i < opt.finalList.length;i++){
            var num = opt.finalList[i].knowList.length/8-1;
            str1 += '<div class="boxes"><div class="title">'+ opt.finalList[i].courseName +'</div>' +
                '<div class="courseOneBox">' +
                '<div>' +
                '<div class="courseNav fl"><h4 class="verline"></h4>';
                if(opt.finalList[i].knowList.length>0){
                    str1+= '<h4 class="inline"></h4><div class="nav1 navCheck">知识点统计</div>' +
                        '<div class="nav2 ">课程统计</div>'+
                        '</div>' +
                        '<div class="courseContent fl">' +
                        '<div class="contentBox1">' +
                        '<div class="knowledgeBox fl">' +
                        '<div class="tap">';
                }else{
                    str1+= '<h4 style="display: none;" class="inline"></h4><div style="display: none;" class="nav1 ">知识点统计</div>' +
                        '<div style="height: 340px;line-height: 340px;" class="nav2 navCheck">课程统计</div>'+
                        '</div>' +
                        '<div class="courseContent fl">' +
                        '<div style="display: none;" class="contentBox1">' +
                        '<div class="knowledgeBox fl">' +
                        '<div class="tap">';
                }
            var m = 0;
            var n = 0;
            for(var j = 0;j < opt.finalList[i].knowList.length;j++){
                if(m%8 == 0){
                    if(n != 0){
                        str1+= '</ul>';
                    }
                    str1+= '<ul>';
                }
                if(opt.finalList[i].knowList[j].grade == 1){
                    str1 +=  '<li title="'+ opt.finalList[i].knowList[j].tasklibrary_knowpoint +'">'+ opt.finalList[i].knowList[j].tasklibrary_knowpoint +'<i class="fr good">●</i></li>';
                }else if(opt.finalList[i].knowList[j].grade == 2){
                    str1 +=  '<li title="'+ opt.finalList[i].knowList[j].tasklibrary_knowpoint +'">'+ opt.finalList[i].knowList[j].tasklibrary_knowpoint +'<i class="fr ok">●</i></li>';
                }else{
                    str1 +=  '<li title="'+ opt.finalList[i].knowList[j].tasklibrary_knowpoint +'">'+ opt.finalList[i].knowList[j].tasklibrary_knowpoint +'<i class="fr soso">●</i></li>';
                }
                n++;
                m++;

            }
            str1 += '</div>' +
                '<div class="navBtnBox">';
            var c = 0;
            for(var k = 0;k<num;k++ ){
                if(c == 0){
                    str1 += '<div class="navBtnCheck"></div>';
                }else{
                    str1 += '<div></div>';
                }
                c++;
            }
            str1 += '<div></div>';
            str1 += '</div>' +
                '</div>' +
                '<div data-brokencount='+ opt.finalList[i].greatCount +'  data-commonlycount='+ opt.finalList[i].badCount +'  data-excellentcount='+ opt.finalList[i].excellentCount +' class="knowledgeSub fl" id="know1">' +
                '</div>' +
                '</div>';

                if(opt.finalList[i].knowList.length>0){
                    str1+= '<div style="display: none;"  class="contentBox2">';
                }else{
                    str1+= '<div  class="contentBox2">';
                }
                str1+= '<div class="colorBox">' +
                '<div class="fl"><i>■</i>理论课学习</div>' +
                '<div class="fl"><i>■</i>实验课学习</div>' +
                '<div class="fl"><i>■</i>学习活跃程度</div>' +
                '</div>' +
                '<div class="courseInfoBox">' +
                '<ul>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].readCourseCount +'</h3>' +
                '<p>阅读课件次数</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].taskcount +'</h3>' +
                '<p>提交作业次数</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ parseInt(opt.finalList[i].taskRate*100) +'%</h3>' +
                '<p>作业提交率</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+opt.finalList[i].onlineExamCount +'</h3>' +
                '<p>在线考试次数</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].comCourseCount+'</h3>' +
                '<p>进入课程次数</p>' +
                '</li>' +
                '</ul>' +
                '<ul>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].exprenotecount +'</h3>' +
                '<p>实验笔记数量</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+   Number(( opt.finalList[i].sumtime/3600).toFixed(2)) +'h</h3>' +
                '<p>实验时长</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].comExpreCount +'</h3>' +
                '<p>实验次数</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].exprecount +'</h3>' +
                '<p>提交实验报告数量</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ parseInt(opt.finalList[i].exprementRate*100) +'%</h3>' +
                '<p>实验报告提交率</p>' +
                '</li>' +
                '</ul>' +
                '<ul>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].preforSource+'</h3>' +
                '<p>平均成绩</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+opt.finalList[i].examSource +'</h3>' +
                '<p>考试成绩</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].sumSource+'</h3>' +
                '<p>总成绩</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].problemcount +'</h3>' +
                '<p>提问问题数量</p>' +
                '<div class="lines"></div>' +
                '</li>' +
                '<li>' +
                '<h3>'+ opt.finalList[i].answercount +'</h3>' +
                '<p>回答问题数量</p>' +
                '</li>' +
                '</ul>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</div></div>';

        }
        var str2 = '</div>' +
            '</div>';
        return str + str1 + str2;
    }
    function stuReport(opt) {
        var omg = opt.memDetail;
        var str= '<div id="container">' +
            '<div class="titleBox">' +
            '<h3>' +
            '学习报告' +
            '</h3>';
        if(opt.mark == 1){
            str+='<img src="'+ opt.schoolIconUrl +'"/>';
        }
        str+='</div>' +
            '<div class="subTitleBox">' +
            '学生信息' +
            '</div>' +
            '<table class="perTable" border="0" cellspacing="0" cellpadding="0">' +
            '<tr>' +
            '<td>' +
            '姓名&emsp;&emsp;&emsp;'+ omg.userName +'' +
            '</td>' +
            '<td>' +
            '班级&emsp;&emsp;&emsp;'+ omg.className +'' +
            '</td>' +
            '<td>' +
            '学号&emsp;&emsp;&emsp;'+ omg.stuorteaId +'' +
            '</td>' +
            '<td>' +
            '性别&emsp;&emsp;&emsp;'+ omg.sexName +'' +
            '</td>' +
            '</tr>' +
            '</table>' +
            '<div class="subTitleBox">' +
            '教学统计分析' +
            '</div>' +
            '<table class="perTables" border="0" cellspacing="0" cellpadding="0">' +
            '<tr>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.readCourseCount +'</h3>' +
            '<p>阅读课件次数</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.taskcount +'</h3>' +
            '<p>提交作业次数</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ parseInt(opt.statisticsMap.homeworRate*100) +'%</h3>' +
            '<p>作业提交率</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.onlineExamCount +'</h3>' +
            '<p>在线考试次数</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ parseInt(opt.statisticsMap.passRate*100) +'%</h3>' +
            '<p>考试及格率</p>' +
            '</td>' +
            '</tr>' +
            '<tr>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.exprenotecount +'</h3>' +
            '<p>实验笔记数量</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+  Number(( opt.statisticsMap.sumtime/3600).toFixed(2))+'h</h3>' +
            '<p>实验时长</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.comExpreCount +'</h3>' +
            '<p>实验次数</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.exprecount +'</h3>' +
            '<p>提交实验报告数量</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ parseInt(opt.statisticsMap.exprementRate*100) +'%</h3>' +
            '<p>实验报告提交率</p>' +
            '</td>' +
            '</tr>' +
            '<tr>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.loginCount +'</h3>' +
            '<p>登录次数</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.comCourseCount +'</h3>' +
            '<p>进入课程次数</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.coutSelectCount +'</h3>' +
            '<p>选课次数</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.problemcount +'</h3>' +
            '<p>提问问题数量</p>' +
            '</td>' +
            '<td>' +
            '<h3>'+ opt.statisticsMap.answercount +'</h3>' +
            '<p>回答问题数量</p>' +
            '</td>' +
            '</tr>' +
            '</table>' +
            '<div class="subTitleBox">' +
            '课程统计分析' +
            '</div>';
        var str1 = "";
        for(var i = 0; i < opt.finalList.length; i++) {
            str1 += '<div class="courseNameBox">' +
                '<i>■</i>' +opt.finalList[i].courseName+'' +
                '</div>' +
                '<table class="perTables" border="0" cellspacing="0" cellpadding="0">' +
                '<tr>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].readCourseCount +'</h3>' +
                '<p>阅读课件次数</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].taskcount +'</h3>' +
                '<p>提交作业次数</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ parseInt(opt.finalList[i].taskRate*100) +'%</h3>' +
                '<p>作业提交率</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+opt.finalList[i].onlineExamCount +'</h3>' +
                '<p>在线考试次数</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].comCourseCount+'</h3>' +
                '<p>进入课程次数</p>' +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].exprenotecount +'</h3>' +
                '<p>实验笔记数量</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+  Number(( opt.finalList[i].sumtime/3600).toFixed(2)) +'h</h3>' +
                '<p>实验时长</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].comExpreCount +'</h3>' +
                '<p>实验次数</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].exprecount +'</h3>' +
                '<p>提交实验报告数量</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ parseInt(opt.finalList[i].exprementRate*100) +'%</h3>' +
                '<p>实验报告提交率</p>' +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].preforSource+'</h3>' +
                '<p>平均成绩</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+opt.finalList[i].examSource +'</h3>' +
                '<p>考试成绩</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].sumSource+'</h3>' +
                '<p>总成绩</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].problemcount +'</h3>' +
                '<p>提问问题数量</p>' +
                '</td>' +
                '<td>' +
                '<h3>'+ opt.finalList[i].answercount +'</h3>' +
                '<p>回答问题数量</p>' +
                '</td>' +
                '</tr>' +
                '</table>';
        }

        str1+='</div>';
        return str+str1;
    }
    var classMana = {
        init: function() {
            this.bindEvent();
        },
        bindEvent: function() {
            var self = this;
            $(".looktg").off("click").click(function () {
                var json = JSON.stringify({
                    "pageName": $(this).attr("data-url"),
                    "paramData": {
                        "some": result.paramData.some
                    }
                });
                window.location.href = "skipPage?jsonStr=" + json;
            });
            var json = JSON.stringify({"stuorteaId":result.paramData.stuorteaId});
            $.ajax({
                type: "post",
                url: "getStuReportDetailByStuId",
                data: {
                    "jsonStr": json
                },
                async: true,
                success: function (msg) {
                    loading1.hide();
                    msg = JSON.parse(msg);
                    if (msg.stuStatisticsMap.result == "success") {
                        var str = report(msg.stuStatisticsMap);
                        $("#contentBox").html(str);
                        $("#contentBox").show();
                        $(".mb").show();
                        var finalRelCoPoListAll = [];
                        if(msg.stuStatisticsMap.finalRelCoPoListAll!=undefined&&msg.stuStatisticsMap.finalRelCoPoListAll!=null&&msg.stuStatisticsMap.finalRelCoPoListAll!=''){
                            for(var i = 0;i < msg.stuStatisticsMap.finalRelCoPoListAll.length;i++){
                                finalRelCoPoListAll.push({"powerName":msg.stuStatisticsMap.finalRelCoPoListAll[i].powerName,"powerSource":parseInt(msg.stuStatisticsMap.finalRelCoPoListAll[i].powerSource)})
                            }
                            self.energyEvent(finalRelCoPoListAll);
                        }

                        var knowledgeSubs = document.getElementsByClassName("knowledgeSub");
                        for(var i = 0;i <  $(".knowledgeSub").length;i++ ){
                            var arr = [];
                            var gradeList = [];
                            if($(".knowledgeSub").eq(i).attr("data-excellentcount")!=0){
                                arr.push("优秀");
                                gradeList.push({"value":$(".knowledgeSub").eq(i).attr("data-excellentcount"),"name":"优秀"});
                            }
                            if($(".knowledgeSub").eq(i).attr("data-brokencount")!=0){
                                arr.push("良好");
                                gradeList.push({"value":$(".knowledgeSub").eq(i).attr("data-brokencount"),"name":"良好"});
                            }
                            if($(".knowledgeSub").eq(i).attr("data-commonlycount")!=0){
                                arr.push("一般");
                                gradeList.push({"value":$(".knowledgeSub").eq(i).attr("data-commonlycount"),"name":"一般"});
                            }
                            self.getDataPic(knowledgeSubs[i],gradeList,arr);
                        }

                        $(".navBtnBox>div").off("click").click(function () {
                            $(this).siblings("div").removeClass("navBtnCheck");
                            $(this).addClass("navBtnCheck");
                            $(this).parent().siblings().children("ul").hide();
                            $(this).parent().siblings().children("ul").eq($(this).index()).show();
                        });
                        $(".courseNav>div").off("click").click(function () {
                            $(this).siblings("div").removeClass("navCheck");
                            $(this).addClass("navCheck");
                            $(this).parent().siblings().children("div").hide();
                            $(this).parent().siblings().children("div").eq($(this).index()-2).show();
                        });
                        var count = 0;
                        $("#showDetail").off("click").click(function () {
                            if(count%2==0){
                                $(this).css({"background":"#fff url(pc/images/ico_reportDetail2.png) no-repeat right 12px center","background-size":"11px"});
                                $(".detailBox").show();
                                $(".detailBox").animate({"height":$(".tableInfo").height() + 30 +"px"},300);
                            }else{
                                $(this).css({"background":"#fff url(pc/images/ico_reportDetail.png) no-repeat right 12px center","background-size":"11px"});
                                setTimeout(function () {
                                    $(".detailBox").hide();
                                },300);
                                $(".detailBox").animate({"height":"0"},300);
                            }
                            count++;
                        });
                        // 显示下载空间
                        $(".downloadBtn").off("click").click(function () {
                            $(".downInfoBox").show();
                        });
                        $(".downloadBtn").mouseleave(function () {
                            $(".downInfoBox").hide();
                        });
                        // 学习报告
                        $(".downReportLoad").off("click").click(function () {
                            var string = stuReport(msg.stuStatisticsMap);
                            var cssStr = '*{margin:0;padding:0;color:#333;font-family:"microsoft yahei";}i{font-style:normal;}.clear{clear:both;}.fl{float:left;}.fr{float:right;}#container{padding:46px 50px 0;margin:0 auto;}.titleBox{height:118px;position:relative;}.titleBox h3{height:100%;width:100%;line-height:162px;text-align:center;font-size:20px;font-weight:bolder;}.titleBox img{position:absolute;right:10px;top:0;}.subTitleBox{height:12px;border-left:4px solid #58a8e8;padding-left:10px;font-size:12px;line-height:12px;font-weight:bolder;margin-bottom:16px;}.perTable{width:100%;table-layout:fixed;height:42px;text-align:center;line-height:42px;margin-bottom:15px;font-size:10px;}.perTable td{border-top:1px solid #6a6a6a;border-bottom:3px solid #6a6a6a;border-right:1px solid #6a6a6a;}.perTable td:last-child{border-right:none;}.perTables{width:100%;table-layout:fixed;text-align:center;margin-bottom:47px;}.perTables tr:nth-of-type(1) td{border-top:1px solid #6a6a6a;border-bottom:1px solid #6a6a6a;border-right:1px solid #6a6a6a;}.perTables tr:nth-of-type(2) td{border-bottom:1px solid #6a6a6a;border-right:1px solid #6a6a6a;}.perTables tr:nth-of-type(3) td{border-bottom:3px solid #6a6a6a;border-right:1px solid #6a6a6a;}.perTables tr:nth-of-type(3) td:last-child,.perTables tr:nth-of-type(2) td:last-child,.perTables tr:nth-of-type(1) td:last-child{border-right:none;}.perTables td{height:44px;}.perTables td h3{font-size:16px;color:#408ee6;}.perTables td p{font-size:8px;}.courseNameBox{font-size:10px;margin-bottom:10px;}.courseNameBox i{margin-right:6px;font-size:10px;}';
                            var jsonStr = JSON.stringify({
                                "reportHtml": string,
                                "mark": 1,
                                "cssStr":cssStr,
                                "stuorteaId":$(this).attr("data-stuorteaid")
                            });
                            $.ajax({
                                type: "post",
                                url: "saveReportHtmlByStuId",
                                data: {
                                    "jsonStr": jsonStr
                                },
                                async: true,
                                success: function (msg) {
                                    loading1.hide();
                                    msg = JSON.parse(msg);
                                    if (msg.result == "success") {
                                        $("body").append("<a href='"+ msg.path+msg.reportFileName +"' download  id='downText'>");
                                        document.getElementById("downText").click();
                                        $("#downText").remove();
                                    }else{
                                        Alert1.content = msg.failMsg;
                                        Alert1.init();
                                        Alert1.show();
                                    }
                                }
                            });
                        });
                        // 作业
                        $(".homeWork .reportZip").off("click").click(function () {
                            var stuorteaId = $(this).attr("data-stuorteaid");
                            var json = JSON.stringify({"stuorteaId":stuorteaId,"downloadType":1});
                            $(".homeWork").html("<img class=\"loadingImg\" src=\"pc/images/reportLoading.gif\" >");
                            $.ajax({
                                type:"post",
                                url:'downloadCourseWorkFile',
                                async:true,
                                data:{
                                    "jsonStr":json
                                },
                                success:function (msg) {
                                    msg = JSON.parse(msg);
                                    if (msg.result == "success") {
                                        self.resetZip(1,stuorteaId);
                                        $(".workDown").after("<img class=\"workDown\" data-url='"+ msg.url +"' src=\"pc/images/ico_reportDownClick.png\">");
                                        $(".workDown").eq(0).remove();
                                        $(".workDown").off("click").click(function () {
                                            $("body").append("<a href='"+ $(this).attr("data-url") +"' download  id='downWork'>");
                                            document.getElementById("downWork").click();
                                            $("#downWork").remove();
                                        });
                                    }else{
                                        Alert1.content = msg.failMsg;
                                        self.resetZip(1,stuorteaId);
                                        Alert1.init();
                                        Alert1.show();
                                    }
                                }
                            })
                        });
                        // 报告
                        $(".labReport .reportZip").off("click").click(function () {
                            var stuorteaId = $(this).attr("data-stuorteaid");
                            var json = JSON.stringify({"stuorteaId":stuorteaId,"downloadType":2});
                            $(".labReport").html("<img class=\"loadingImg\" src=\"pc/images/reportLoading.gif\" >");
                            $.ajax({
                                type:"post",
                                url:'downloadCourseWorkFile',
                                async:true,
                                data:{
                                    "jsonStr":json
                                },
                                success:function (msg) {
                                    msg = JSON.parse(msg);
                                    if (msg.result == "success") {
                                        self.resetZip(2,stuorteaId);
                                        $(".reportDown").after("<img class=\"reportDown\" data-url='"+ msg.url +"' src=\"pc/images/ico_reportDownClick.png\">");
                                        $(".reportDown").eq(0).remove();
                                        $(".reportDown").off("click").click(function () {
                                            $("body").append("<a href='"+ $(this).attr("data-url") +"' download  id='downReport'>");
                                            document.getElementById("downReport").click();
                                            $("#downReport").remove();
                                        });
                                    }else{
                                        Alert1.content = msg.failMsg;
                                        self.resetZip(2,stuorteaId);
                                        Alert1.init();
                                        Alert1.show();
                                    }
                                }
                            })
                        });
                        // 试卷
                        $(".text .reportZip").off("click").click(function () {
                            var stuorteaId = $(this).attr("data-stuorteaid");
                            var json = JSON.stringify({"stuorteaId":stuorteaId,"downloadType":3});
                            $(".text").html("<img class=\"loadingImg\" src=\"pc/images/reportLoading.gif\" >");
                            $.ajax({
                                type:"post",
                                url:'downloadCourseWorkFile',
                                async:true,
                                data:{
                                    "jsonStr":json
                                },
                                success:function (msg) {
                                    msg = JSON.parse(msg);
                                    if (msg.result == "success") {
                                        self.resetZip(3,stuorteaId);
                                        $(".textDown").after("<img class=\"textDown\" data-url='"+ msg.url +"' src=\"pc/images/ico_reportDownClick.png\">");
                                        $(".textDown").eq(0).remove();
                                        $(".textDown").off("click").click(function () {
                                            $("body").append("<a href='"+ $(this).attr("data-url") +"' download  id='downText'>");
                                            document.getElementById("downText").click();
                                            $("#downText").remove();
                                        });
                                    }else{
                                        Alert1.content = msg.failMsg;
                                        self.resetZip(3,stuorteaId);
                                        Alert1.init();
                                        Alert1.show();
                                    }
                                }
                            })
                        });
                        self.skipEvent();
                    }else{
                        if(msg.stuStatisticsMap.failMsg == "暂无权限"){
                            parent.location.reload(true);
                        }else{
                            Alert1.content = msg.stuStatisticsMap.failMsg;
                            Alert1.init();
                            Alert1.show();
                        }
                    }
                }
            });


        },
        resetZip:function (type,stuorteaId) {
            var self = this;
            if(type == 1){
                $(".homeWork").html("<i data-stuorteaid='"+ stuorteaId +"' class=\"reportZips rework fl\">重新打包</i><img class=\"gzipImg\" src=\"pc/images/ico_zipImg.png\">");
                $(".rework").off("click").click(function () {
                    var stuorteaId = $(this).attr("data-stuorteaid");
                    $(".workDown").off("click");
                    $(".workDown").attr("src","pc/images/ico_reportDownNone.png");
                    var json = JSON.stringify({"stuorteaId":stuorteaId,"downloadType":1});
                    $(".homeWork").html("<img class=\"loadingImg\" src=\"pc/images/reportLoading.gif\" >");
                    $.ajax({
                        type:"post",
                        url:'downloadCourseWorkFile',
                        async:true,
                        data:{
                            "jsonStr":json
                        },
                        success:function (msg) {
                            msg = JSON.parse(msg);
                            if (msg.result == "success") {
                                self.resetZip(1,stuorteaId);
                                $(".workDown").after("<img class=\"workDown\" data-url='"+ msg.url +"' src=\"pc/images/ico_reportDownClick.png\">");
                                $(".workDown").eq(0).remove();
                                $(".workDown").off("click").click(function () {
                                    $("body").append("<a href='"+ $(this).attr("data-url") +"' download  id='downWork'>");
                                    document.getElementById("downWork").click();
                                    $("#downWork").remove();
                                });
                            }else{
                                Alert1.content = msg.failMsg;
                                self.resetZip(1,stuorteaId);
                                Alert1.init();
                                Alert1.show();
                            }
                        }
                    })
                });
            }else if(type == 2){
                $(".labReport").html("<i data-stuorteaid='"+ stuorteaId +"' class=\"reportZips report fl\">重新打包</i><img class=\"gzipImg\" src=\"pc/images/ico_zipImg.png\">");
                $(".report").off("click").click(function () {
                    var stuorteaId = $(this).attr("data-stuorteaid");
                    $(".reportDown").off("click");
                    $(".reportDown").attr("src","pc/images/ico_reportDownNone.png");
                    var json = JSON.stringify({"stuorteaId":stuorteaId,"downloadType":2});
                    $(".labReport").html("<img class=\"loadingImg\" src=\"pc/images/reportLoading.gif\" >");
                    $.ajax({
                        type:"post",
                        url:'downloadCourseWorkFile',
                        async:true,
                        data:{
                            "jsonStr":json
                        },
                        success:function (msg) {
                            msg = JSON.parse(msg);
                            if (msg.result == "success") {
                                self.resetZip(2,stuorteaId);
                                $(".reportDown").after("<img class=\"reportDown\" data-url='"+ msg.url +"' src=\"pc/images/ico_reportDownClick.png\">");
                                $(".reportDown").eq(0).remove();
                                $(".reportDown").off("click").click(function () {
                                    $("body").append("<a href='"+ $(this).attr("data-url") +"' download  id='downReport'>");
                                    document.getElementById("downReport").click();
                                    $("#downReport").remove();
                                });
                            }else{
                                Alert1.content = msg.failMsg;
                                self.resetZip(2,stuorteaId);
                                Alert1.init();
                                Alert1.show();
                            }
                        }
                    })
                });
            }else{
                $(".text").html("<i data-stuorteaid='"+ stuorteaId +"' class=\"reportZips retext fl\">重新打包</i><img class=\"gzipImg\" src=\"pc/images/ico_zipImg.png\">");
                $(".retext").off("click").click(function () {
                    var stuorteaId = $(this).attr("data-stuorteaid");
                    $(".textDown").off("click");
                    $(".textDown").attr("src","pc/images/ico_reportDownNone.png");
                    var json = JSON.stringify({"stuorteaId":stuorteaId,"downloadType":3});
                    $(".text").html("<img class=\"loadingImg\" src=\"pc/images/reportLoading.gif\" >");
                    $.ajax({
                        type:"post",
                        url:'downloadCourseWorkFile',
                        async:true,
                        data:{
                            "jsonStr":json
                        },
                        success:function (msg) {
                            msg = JSON.parse(msg);
                            if (msg.result == "success") {
                                self.resetZip(3,stuorteaId);
                                $(".textDown").after("<img class=\"textDown\" data-url='"+ msg.url +"' src=\"pc/images/ico_reportDownClick.png\">");
                                $(".textDown").eq(0).remove();
                                $(".textDown").off("click").click(function () {
                                    $("body").append("<a href='"+ $(this).attr("data-url") +"' download  id='downtext'>");
                                    document.getElementById("downtext").click();
                                    $("#downtext").remove();
                                });
                            }else{
                                Alert1.content = msg.failMsg;
                                self.resetZip(3,stuorteaId);
                                Alert1.init();
                                Alert1.show();
                            }
                        }
                    })
                });
            }

        },
        skipEvent:function () {
            var self = this;
            // 导航跳转事件
            $(".infoMain>ul").eq(0).children("li").eq(0).click(function () {
                self.skipMyCourse();
            });
            $(".infoMain>ul").eq(0).children("li").eq(1).click(function () {
                var json = JSON.stringify({
                    "pageName":"teacherJobManagement"
                });
                $(".box_1",parent.document).removeClass("navBg");
                $(".teaMana",parent.document).addClass("navBg");
                $(".mainNav",parent.document).html('<div data-num="0"  data-url="teacherClassManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;班级管理</a></div><div  data-url="teacherExperimentalManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;实验管理</a></div><div data-url="teacherJobManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;作业管理</a></div><div data-num="0" data-url="teacherGradeManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩管理</a></div><div data-url="teacherAchievementWeight" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩设置</a></div>');
                $(".navFirst",parent.document).eq(2).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");

                window.location.href = "skipPage?jsonStr="+json;
            });
            $(".infoMain>ul").eq(0).children("li").eq(2).click(function () {
                var json = JSON.stringify({
                    "pageName":"teacherJobManagement"
                });
                $(".box_1",parent.document).removeClass("navBg");
                $(".teaMana",parent.document).addClass("navBg");
                $(".mainNav",parent.document).html('<div data-num="0"  data-url="teacherClassManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;班级管理</a></div><div  data-url="teacherExperimentalManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;实验管理</a></div><div data-url="teacherJobManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;作业管理</a></div><div data-num="0" data-url="teacherGradeManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩管理</a></div><div data-url="teacherAchievementWeight" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩设置</a></div>');
                $(".navFirst",parent.document).eq(2).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");

                window.location.href = "skipPage?jsonStr="+json;
            });
            $(".infoMain>ul").eq(0).children("li").eq(3).click(function () {
                var json = JSON.stringify({
                    "pageName":"testReviewMana"
                });
                $(".box_1",parent.document).removeClass("navBg");
                $(".testMana",parent.document).addClass("navBg");
                $(".mainNav",parent.document).html('<div data-num="0" data-url="testBaseMana" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;题库管理</a></div><div data-url="testGenerate" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;生成试卷</a></div><div data-num="0"  data-url="testReviewMana" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;在线批阅</a></div>');
                $(".navFirst",parent.document).eq(2).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");
                window.location.href = "skipPage?jsonStr="+json;
            });
            $(".infoMain>ul").eq(0).children("li").eq(4).click(function () {
                var json = JSON.stringify({
                    "pageName":"teacherGradeManagement"
                });
                $(".box_1",parent.document).removeClass("navBg");
                $(".teaMana",parent.document).addClass("navBg");
                $(".mainNav",parent.document).html('<div data-num="0"  data-url="teacherClassManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;班级管理</a></div><div  data-url="teacherExperimentalManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;实验管理</a></div><div data-url="teacherJobManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;作业管理</a></div><div data-num="0" data-url="teacherGradeManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩管理</a></div><div data-url="teacherAchievementWeight" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩设置</a></div>');
                $(".navFirst",parent.document).eq(3).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");

                window.location.href = "skipPage?jsonStr="+json;
            });
            $(".infoMain>ul").eq(1).children("li").eq(0).click(function () {
                self.skipLab();
            });
            $(".infoMain>ul").eq(1).children("li").eq(1).click(function () {
                self.skipLab();
            });
            $(".infoMain>ul").eq(1).children("li").eq(2).click(function () {
                self.skipLab();
            });
            $(".infoMain>ul").eq(1).children("li").eq(3).click(function () {
                self.skipLab();
            });
            $(".infoMain>ul").eq(1).children("li").eq(4).click(function () {
                self.skipLab();
            });
            $(".infoMain>ul").eq(2).children("li").eq(0).click(function () {
                self.skipMyCourse();
            });
            $(".infoMain>ul").eq(2).children("li").eq(1).click(function () {
                self.skipMyCourse();
            });
            $(".infoMain>ul").eq(2).children("li").eq(2).click(function () {
                var json = JSON.stringify({
                    "pageName":"teacherClassManagement"
                });
                $(".box_1",parent.document).removeClass("navBg");
                $(".teaMana",parent.document).addClass("navBg");
                $(".mainNav",parent.document).html('<div data-num="0"  data-url="teacherClassManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;班级管理</a></div><div  data-url="teacherExperimentalManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;实验管理</a></div><div data-url="teacherJobManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;作业管理</a></div><div data-num="0" data-url="teacherGradeManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩管理</a></div><div data-url="teacherAchievementWeight" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩设置</a></div>');
                $(".navFirst",parent.document).eq(0).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");

                window.location.href = "skipPage?jsonStr="+json;
            });
            $(".infoMain>ul").eq(2).children("li").eq(3).click(function () {
                var json = JSON.stringify({
                    "pageName":"teacherAnswer"
                });
                $(".box_1",parent.document).removeClass("navBg");
                $(".teaIssue",parent.document).addClass("navBg");
                $(".mainNav",parent.document).html('<div data-num="0" data-url="teacherAnswer"  class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;课程问答</a></div><div data-num="0"  data-url="teacherMyQuestion" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;我的提问</a></div><div data-num="0"  data-url="teacherMyAnswer" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;我的回答</a></div>');
                $(".navFirst",parent.document).eq(0).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");
                window.location.href = "skipPage?jsonStr="+json;
            });
            $(".infoMain>ul").eq(2).children("li").eq(4).click(function () {
                var json = JSON.stringify({
                    "pageName":"teacherAnswer"
                });
                $(".box_1",parent.document).removeClass("navBg");
                $(".teaIssue",parent.document).addClass("navBg");
                $(".mainNav",parent.document).html('<div data-num="0" data-url="teacherAnswer"  class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;课程问答</a></div><div data-num="0"  data-url="teacherMyQuestion" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;我的提问</a></div><div data-num="0"  data-url="teacherMyAnswer" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;我的回答</a></div>');
                $(".navFirst",parent.document).eq(0).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");
                window.location.href = "skipPage?jsonStr="+json;
            });

        },
        skipMyCourse:function () {
            $(".box_1",parent.document).removeClass("navBg");
            $(".teaMyCourse",parent.document).addClass("navBg");
            $.ajax({
                type:"post",
                url:"skipMyCourse",
                async:true,
                success:function(msg){
                    msg = JSON.parse(msg);
                    var str ="";
                    var n = 0;
                    if(msg.courseList.length!=0){
                        $.map(msg.courseList, function(opt) {
                            str += '<div data-num="0"  data-url="myCourse"  data-courseid='+ opt.courseId +'  class="navFirst"><a href="javascript:;" title='+ opt.courseName +' class="nav_0">&emsp;&emsp;&emsp;&emsp;'+ opt.courseName +'</a></div>';
                        });
                        $(".mainNav",parent.document).html(str);
                        $(".navFirst",parent.document).eq(0).attr("data-num","1").find(".nav_0").addClass("leftClick");
                        var json = JSON.stringify({
                            "pageName": "myCourse",
                            "paramData":{
                                "courseId":Number($(".navFirst",parent.document).eq(0).attr("data-courseid"))
                            }
                        });
                        window.location.href = "skipPage?jsonStr="+json;
                    }else{
                        Alert1.content = "当前没有课程，请联系管理员分配课程";
                        Alert1.init();
                        Alert1.show();
                    }

                }
            });
        },
        skipLab:function () {
            var json = JSON.stringify({
                "pageName":"teacherExperimentalManagement"
            });
            $(".box_1",parent.document).removeClass("navBg");
            $(".teaMana",parent.document).addClass("navBg");
            $(".mainNav",parent.document).html('<div data-num="0"  data-url="teacherClassManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;班级管理</a></div><div  data-url="teacherExperimentalManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;实验管理</a></div><div data-url="teacherJobManagement" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;作业管理</a></div><div data-num="0" data-url="teacherGradeManagement" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩管理</a></div><div data-url="teacherAchievementWeight" data-num="0" class="navFirst"><a href="javascript:;" class="nav_0">&emsp;&emsp;&emsp;&ensp;成绩设置</a></div>');
            $(".navFirst",parent.document).eq(1).attr("data-num","1").find(".nav_0",parent.document).addClass("leftClick");

            window.location.href = "skipPage?jsonStr="+json;
        },
        getDataPic:function (id,gradeList,arr) {
            var myCharts = echarts.init(id);
            var options = {
                legend: {
                    x : 'center',
                    y:'bottom',
                    itemWidth:15,
                    itemGap:20,
                    data:arr
                },
                tooltip : {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                calculable : true,
                color:['#33bef7','#70ebfb','#4082fd','#333'],
                series : [
                    {

                        name:'知识点掌握情况',
                        type:'pie',
                        radius : ['30%', '70%'],
                        itemStyle : {
                            normal : {
                                label : {
                                    color:['#727272'],
                                    show : true
                                },
                                labelLine : {
                                    show : true
                                }
                            },
                            emphasis: {
                                label: {
                                    show: true,
                                    position: 'outer'
                                },
                                labelLine: {
                                    show: true,
                                    lineStyle: {
                                        color: 'red'
                                    }
                                }
                            }
                        },
                        data:gradeList
                    }
                ]
            };
            myCharts.setOption(options);
        },
        energyEvent:function(arr){
            var myChart = echarts.init(document.getElementById('energy'));
            var indicator = [];
            var value = [];
            for(var i= 0;i < arr.length;i++){
                indicator.push({"text":arr[i].powerName,"max":100,"color":"#333"});
                value.push(arr[i].powerSource);
            }
            var option = {
                tooltip : {
                    trigger: 'axis'
                },
                calculable : true,
                color:['#428bd9','#333','#3270b5'],
                textStyle: {
                    fontSize:'16' // 工艺等文字颜色
                },
                polar : [
                    {
                        indicator : indicator,
                        axisLine: {            // 坐标轴线
                            show: true,       // 默认显示，属性show控制显示与否
                            lineStyle: {
                                width : 1,
                                color: '#d6d6d6' // 坐标轴刻度文字的样式
                            }
                        },
                        axisLabel: {           // 坐标轴文本标签，详见axis.axisLabel
                            show: false
                        },
                        splitLine : {
                            show : true,
                            lineStyle : {
                                width : 1,
                                color : '#d6d6d6' // 图表背景网格线的颜色
                            }
                        },
                        splitArea : {
                            show : true,
                            areaStyle : {
                                color: ["#fff"]  // 图表背景网格的颜色
                            }
                        },
                        radius : 100
                    }
                ],
                series : [
                    {
                        type: 'radar',
                        itemStyle: {
                            normal: {
                                areaStyle: {
                                    type: 'default'
                                }
                            }
                        },
                        data : [
                            {
                                value : value,
                                name : '学生',
                                label: {
                                    normal: {
                                        show: true,
                                        formatter: function (params) {
                                            return params.value;
                                        }
                                    }

                                }

                            }
                        ]
                    }
                ]
            };
            myChart.setOption(option);
        }
    };
    classMana.init();
});